A technique available for pattern matching involves setting a window on image data obtained by imaging a subject, and calculating degree of coincidence or degree of similarity between partial image data within the window and standard image data registered in advance. By executing the above-described processing with regard to the window at each position thereof while the window is made to scan within a picture, a window containing partial image data exhibiting the highest degree of coincidence or similarity is detected, thereby making it possible to recognize a position at which an image identical or similar to the standard image exists. Thus, measurement processing of various types can be executed with regard to image data within a specified window.
Image data generally is represented by eight or more bits per pixel. Line memories are used in order to extract image data within a set window at a video rate. The line memories, the number of which corresponds to the number of pixels in the vertical direction of the window, are connected in cascade, and image data is transferred among the line memories in synchronism with a clock signal. By extracting image data at a single stroke from a prescribed position of each line memory, e.g., the terminus of the line memory, one column of image data in the vertical direction of the window is obtained.
In an image processor having such a configuration, a problem encountered is that a large number of line memories of at least eight bits each must be provided, as a result of which there is an increase in the scale of hardware. Further, pattern-matching processing of eight bits per pixel is required. When this is implemented by hardware, the scale of circuitry is similarly increased. If it is attempted to implement the foregoing by software, more complicated processing results.